<?php

defined('MYLITS') ? '' : exit('No direct script access allowed');

/**
 * @version     1.0.0
 * @package     mylits engine
 * @license     GNU General Public License version 3
 * @author      Arfan Fudyartanto D N <arfan@mylits.com> - http://engine.mylits.com
 */
class usersHelper {

    public static function userInputValidation($model) {
        extract($_POST);
        if (empty($core_user_name)) {
            $msgClass = 'warning';
            $msg[] = Mylits_Language::getText('name_is_required');
        }
        if (empty($core_user_username)) {
            $msgClass = 'warning';
            $msg[] = Mylits_Language::getText('username_is_required');
        } 
        if (empty($core_user_email)) {
            $msgClass = 'warning';
            $msg[] = Mylits_Language::getText('email_is_required');
        }
        if (!isset($group)) {
            $msgClass = 'warning';
            $msg[] = Mylits_Language::getText('group_is_required');
        }

        return compact('msgClass', 'msg');
    }

}

?>
